package www.dashu.com.controller;

import www.dashu.com.api.CommonResult;
import www.dashu.com.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;


/**
 * 首页内容管理Controller
 */
@Controller
@Api(tags = "HomeController", description = "首页内容管理")
@RequestMapping("/test")
public class TestController
{

    @Autowired
    TestService testService;

    @ApiOperation("首页内容页信息展示")
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult content() {
        return CommonResult.success(Arrays.asList("aaa"));
    }

    @ApiOperation("首页内容页信息展示")
    @RequestMapping(value = "/test2", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult test() {
        return testService.test();
    }

}
